import request from '@/utils/request';

export async function queryDayRule(storeId, params) {
  return request(`store/statistics/day/${storeId}`, {
    params,
  });
}
export async function queryWeekRule(storeId, params) {
  return request(`store/statistics/week/${storeId}`, {
    params,
  });
}
export async function queryMonthRule(storeId, params) {
  return request(`store/statistics/month/${storeId}`, {
    params,
  });
}
export async function queryYearRule(storeId, params) {
  return request(`store/statistics/year/${storeId}`, {
    params,
  });
};
export async function chartsService(time, date, params) {
  return request(time === 'week' ? `/store/charts/${time}` : `/store/charts/${time}/${date}`, {
    params
  })
}
